{% load i18n %}

<table class="friends_box">
    {% if not paginator.count %}
    <caption>{% trans "You have no friends in your friends list" %}</caption>
    {% endif %}
    <thead>
        <th class="col1 span-2" style="text-align: center;">Avatar</th>
        <th class="col2 span-8">{% trans "Username" %}</th>
        <th class="col3 last span-2">{% trans "Actions" %}</th>
    </thead>
    <tbody>
        {% for friend in page.object_list %}
        <tr id="friend_{{friend}}">
            <td style="text-align: center;">
                <img class="user_avatar"
                    src="{{friend.forum_profile.get_avatar_url}}"></img>
            </td>
            <td><a href="{% url forum_user friend.username,"view" %}">{{ friend.username }}</a></td>
            <td>
                {% if owner %}
                <a href='javascript: add_friend("{% url forum_friend_act friend.username,"remove"%}", "friend_{{friend}}")'><img id="remove_friend" src="{{MEDIA_URL}}images/forum/static/x.png"></img></a>
                {% else %}
                No actions allowed
                {% endif %}
            </td>
        </tr>
        {% endfor %}
    </tbody>
    <tfoot></tfoot>
</table>

